package com.yc.chaoshi.cs_manage.mapper;

import com.yc.chaoshi.entity.PmsFenlei1;
import com.yc.chaoshi.entity.PmsFenlei3;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xz
 * @since 2022-08-04
 */
public interface PmsFenlei3Mapper extends BaseMapper<PmsFenlei3> {

    List<PmsFenlei3> selectfenlei3(@Param("cname")String cname,
                                   @Param("page")int page,
                                   @Param("size") int size);

    @Delete("delete from pms_fenlei3 where cid=#{cid}")
    Long deletefenlei3(@Param("cid") int cid);

    @Insert("insert into pms_fenlei3 values(default,#{bid},#{cname},#{display},#{des})")
    Long insertfenlei3(@Param("cname") String cname,
                       @Param("bid") int bid,
                       @Param("display") int display,
                       @Param("des") String des
    );


    @Update("update pms_fenlei3 set cname=#{cname},bid=#{bid},display=#{display}, des=#{des} where cid=#{cid}")
    Long updatefenlei3(@Param("bname") String bname,
                       @Param("bid")int bid,
                       @Param("display") int display,
                       @Param("des") String des,
                       @Param("cid") int cid);

}
